package com.xuanrui.commons.enums;

/** 麻将游戏类型
 * @author afeng
 * @version 1.0
 * @date 2022/10/19 上午1:42
 */
public enum GameTypeEnum {
    SIZE(10006, "长沙麻将"),
    APPEARANCE(10007, "红中麻将"),
    RUN_FAST(10008, "跑得快"),
    ;

    private int type;
    private String desc;

    GameTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String getGameTypeEnum(int type) {

        for (GameTypeEnum var : GameTypeEnum.values()) {
            if (type == var.getType())
                return var.getDesc();
        }
        return "长沙麻将";
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
